package com.zivwu.mvp.view;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.LifecycleOwner;
import androidx.recyclerview.widget.RecyclerView;

import com.zivwu.mvp.presenter.IPresenter;
import com.zivwu.mvp.view.load.ILoad;
import com.zivwu.mvp.view.load.LoadingController;

import io.reactivex.disposables.CompositeDisposable;

public interface IView extends IToast, ILoad.Loading, LifecycleOwner {
    void finish();

    Context getContext();

    FragmentActivity getActivity();

    LoadingController getLoadingController();

    CompositeDisposable getDisposable();

    void startActivityForResult(Intent intent, int requestCode);

    void showDialog(DialogFragment fragment);

    void addPresenter(IPresenter.Presenter presenter);

    Bundle getTransitionBundle();

    interface ListView extends IView {
        void bindRvList(RecyclerView.Adapter adapter,
                        IPresenter.ListPresenter presenter, boolean load);

        void setRefreshing(boolean refreshing);


        void setRefreshEnable(boolean enable, IPresenter.ListPresenter presenter);

    }
}
